package com.slz3.business.module.systemManagement.sysRoleMenu.steward;

import com.slz3.business.frame.module.Services;
import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.frame.steward.Steward;
import com.slz3.business.frame.util.VE;
import com.slz3.business.module.systemManagement.sysRoleMenu.domain.SysRoleMenu;
import com.slz3.business.module.systemManagement.sysRoleMenu.domain.SysRoleMenuFactory;
import com.slz3.business.module.systemManagement.sysUser.steward.SysUserConverter;
import org.springframework.data.domain.Page;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

import java.util.List;

public class SysRoleMenuResExecutor {

    protected Mono<ServerResponse> add(ServerRequest req, SysRoleMenu sysRoleMenu) {
        SysUserConverter.setSaveUpdateUser(req, sysRoleMenu, true);
        Services.sysRoleMenuTransactional.save(sysRoleMenu);
        return RR.success(req, ResInfo.builder().code(RR.SUCCESS).build());
    }
}
